<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/9/29
 * Time: 8:15
 */

class person{
    public $name;
    public $age;
    public $sex;

    public function construct($na,$ag,$se){
        $this->name=$na;
        $this->age=$ag;
        $this->sex=$se;
        $this->say();
    }
    public function say(){
        echo "我的名字是:{$this->name},我的年龄:{$this->age},我的别名是：{$this->sex}";
    }

    public function set($name,$value)
    {
        $this->name=$value;
    }
    public function _set($name,$value){
        if($name=='age')
    }
}


$my=new person();
$my->age=20;
$my->sex="miaoxiaoke";
$my->name="miaomaoke";


$my->say();